int gcd (int a, int b)
{
    if (b == 0)
    {
        return a;
    }
    return gcd(b , a % b);
}

char ** simplifiedFractions(int n, int* returnSize){
    char **ans = (char *)malloc(sizeof(char *) * n * (n - 1) / 2);
    int pos = 0;
    for (int fenmu = 2 ; fenmu <= n ; fenmu++)
    {
        for (int fenzi = 1 ; fenzi < fenmu ; fenzi++)
        {
            if (gcd(fenzi,fenmu) == 1)
            {
                ans[pos] = (char *)malloc(sizeof(char) * 8);
                sprintf(ans[pos],"%d%c%d",fenzi,'/',fenmu);
                pos++;
            }
        }
    }
    *returnSize = pos;
    return ans;
}